﻿
using PSE.Framework.Communication.Configuration.Adapters.File.XmlFile;
using PSE.Framework.Communication.Configuration.Adapters.File;
using System.Configuration;
using System.Text;
using System.Xml.Serialization;
using System.ComponentModel;
using System.Collections.Specialized;
namespace PSE.Framework.Communication.Configuration.File.XmlFile
{
    public class XmlFileOutputConfiguration : FileOutputAdapterConfiguration
    {

        [ConfigurationProperty("actions", IsRequired = true)]
        public new XmlFileOutputAdapterActionConfigurationCollection Actions
        {
            get
            {
                return (XmlFileOutputAdapterActionConfigurationCollection)base["actions"];
            }
        }

        [ConfigurationProperty("root", IsRequired = false)]
        public string Root
        {
            get
            {
                return (string)base["root"];
            }
        }

        [ConfigurationProperty("transformFile", IsRequired = false)]
        public string TransformFile
        {
            get
            {
                return CommunicationConfigurationManager.GetFullPath((string)base["transformFile"]);
            }
        }

        [ConfigurationProperty("transformPath", IsRequired = false)]
        public string TransformPath
        {
            get
            {
                return CommunicationConfigurationManager.GetFullPath((string)base["transformPath"]);
            }
        }

        [ConfigurationProperty("encoding", IsRequired = false, DefaultValue = "UTF-8")]
        public string Encoding
        {
            get
            {
                return (string)base["encoding"];
            }
        }

        [ConfigurationProperty("namespaces", IsRequired = false)]
        public KeyValueConfigurationCollection Namespaces
        {
            get
            {
                return (KeyValueConfigurationCollection)base["namespaces"];
            }
        }
    }
}